package com.atxiaodei.alibabaseata.controller;

import com.atxiaodei.alibabaseata.entity.CommonResult;
import com.atxiaodei.alibabaseata.entity.Order;
import com.atxiaodei.alibabaseata.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName OrderController
 * @Deacription TODO
 * @Author 王盟
 * @Date 2021/2/28 18:10
 * @Version 1.0
 **/
@RestController
public class OrderController {
    @Resource
    private OrderService orderService;
    /**
     * 创建订单
     * @param order
     * @return
     */
    @GetMapping("/order/create")
    public CommonResult create(Order order) {
        orderService.create(order);
        return new CommonResult(200, "订单创建成功");
    }


}
